<?php
/**
 * Created by PhpStorm.
 * User: gakuin
 * Date: 7/8/16
 * Time: 4:03 PM
 */
namespace app\controllers;
use yii;
use yii\web\Controller;
use app\models\Commodity;
class CommodityController extends  Controller
{
    public function actionGetCommodity(){
        \Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
        $commdityModel=new Commodity();
        return ['commodity'=>$commdityModel->getCommodity()];
    }
}